package Entities;

import java.util.Observable;
import java.util.Observer;


/**
 * The Class ClientEntity implements Observer interface.
 */
public class ClientEntity implements Observer{

	/** The host. */
	private String host;
	
	/** The port. */
	private int port;
	
	/**
	 * Instantiates a new client entity.
	 */
	public ClientEntity(){
		
	}
	
	/**
	 * Instantiates a new client entity.
	 *
	 * @param host the host
	 * @param port the port
	 */
	public ClientEntity(String host, int port) {
		this.host = host;
		this.port = port;
	}


	/**
	 * Gets the host.
	 *
	 * @return the host
	 */
	public String getHost() {
		return host;
	}


	/**
	 * Sets the host.
	 *
	 * @param host the new host
	 */
	public void setHost(String host) {
		this.host = host;
	}


	/**
	 * Gets the port.
	 *
	 * @return the port
	 */
	public int getPort() {
		return port;
	}


	/**
	 * Sets the port.
	 *
	 * @param port the new port
	 */
	public void setPort(int port) {
		this.port = port;
	}


	/* (non-Javadoc)
	 * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
	 */
	@Override
	public void update(Observable o, Object arg) {
		
		String msg = (String) arg.toString();
		if(msg.startsWith("#"))
			System.out.println(msg);
					
	}

}

